package cn.snowheart.strategy.order.service;

import cn.snowheart.strategy.order.entity.OrderDTO;
import cn.snowheart.strategy.order.enums.OrderType;

/**
 * 传统的订单处理逻辑实现
 *
 * @author liuwanxiang
 * @version 2019/06/24
 */
public class OrderServiceV1Impl implements IOrderService {
    @Override
    public String handle(OrderDTO order) {
        String result = null;
        if (OrderType.NORMAL == order.getType()) {
            result = "普通类型订单处理结果";
        } else if (OrderType.GROUP == order.getType()) {
            result = "团购类型订单处理结果";
        } else if (OrderType.DISCOUNT == order.getType()) {
            result = "促销类型订单处理结果";
        }
        return result;
    }
}
